#ifndef kfs_time_hpp_included
#define kfs_time_hpp_included

#include <time.h>
#include <stdint.h>

namespace KfsTime
{
    inline uint64_t toNanosec(struct timespec const& tv)
    {
        uint64_t sum = tv.tv_sec;
        sum *= 1000000000;
        sum += tv.tv_nsec;
        return sum;
    }

    uint64_t timeNow();
}

#endif // kfs_time_hpp_included
